During video streaming, the bandwidth available may change over time. Consequently, the outgoing bit rate of the streaming application needs to be adjusted to fit the available bandwidth in real time in order to avoid congestion. One way to enable real-time bit rate adjustments is the use of a real-time encoder, but it needs to allocate one encoding system per client that may be unacceptable in case of numerous clients as for VOD services for example. Another way to enable real-time bit rate adjustments is the use of scalable video coding. In scalable coding, a video source is encoded into several layers. During the transmission in order to adjust the outgoing bit rate, the server selects the layers to be sent (mode “push”) or the decoder asks for the layers to be sent (mode “pull”). The method is suitable for streaming over heterogeneous channels, but scalable video coding degrades the overall compression efficiency and increases the computational complexity of both the encoder and the decoder compared to single layer video coding. A simple method to realize bit rate adjustment is to encode multiple versions of the same video sequence. These versions have different resolution and/or quality levels and thus different bit rates. During the streaming, when there is a need to adjust the outgoing bit rate, the stream to be transmitted can be switched dynamically from one version to the other in order to fit the bandwidth requirement or user's capability as depicted on FIG. 1. This solution is known as “stream switching”. However, directly switching between streams at inter-coded pictures (P or B pictures) may cause the mismatch of reconstructed reference pictures and results in incorrect pictures reconstruction. The quality of reconstructed video may be degraded significantly. One method to solve the problem is to use Random Access Points (RAP) in the bit-stream (typically I pictures or IDR pictures or CRA pictures). IDR is the English acronym of “Instantaneous Decoder Refresh” and CRA of “Clean Random Access”. As switching can take place at these RAP only, the RAP need to be assigned frequently in the bit stream in order to realize prompt stream switching. However, encoding such I/IDR pictures introduce a substantial bit rate overhead. In addition, the pictures after the RAP that uses reconstructed reference pictures located before the RAP are either skipped or not decoded correctly because they use reconstructed reference picture(s) which is/are different from the one(s) used in the encoding as depicted on FIG. 2. On FIG. 2, Ic is reconstructed from reconstructed reference picture I1 and I2 while it was encoded from reconstructed reference picture i1 and i2.
In AVC, special picture types (SI/SP) were designed that allow for identical reconstruction of a picture from another stream and thus facilitate stream switching. Video pictures are thus encoded into SP pictures at switching points instead of intra-coded pictures as depicted on FIG. 3. The coding efficiency of the SP pictures is higher than that of intra-coded pictures, but they are still less efficient than normal P pictures. Therefore, the overall coding efficiency is still degraded if many switching points are assigned. In the document from Zhou et al entitled “Efficient bit stream switching of H.264 coded video” and published in proc. of SPIE vol. 5909 (2005), a solution is disclosed that makes it possible to switch at any time without a substantial bit rate overhead. The solution is provided only for IPPP GOP structure. In addition to the multiple versions of the same video sequence at different bit rate, a DIFF picture is encoded for the reconstructed reference picture of the current picture on which the switch occurs as depicted on FIG. 4. The DIFF picture is the difference of the reconstructed reference picture of the current picture and the timely corresponding picture in the other stream. The difference picture is transmitted to the decoder to compensate the mismatch. As the DIFF picture is only transmitted when switching occurs as mentioned on page 5 of the document, the bit rate overhead introduced by the above scheme is small. On the other hand, the solution only works for P-picture predicted from a single reconstructed reference picture. In addition, this solution requires that the encoding order and the display order are identical.